package com.cx.mall.demo.config;


import com.cx.mall.demo.entity.Children;
import com.cx.mall.demo.entity.Dog;
import com.cx.mall.demo.entity.Person;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class ContainerConfig {
    @Bean // 相当于Dog dog = new Dog()
    public Dog dog(){
        return new Dog();
    }
    @Bean(value = "p") // 相当于 Person p = new Person()
    public Person person(){
        return  new Person();
    }
    @Bean
    public Children children(){
        return new Children();
    }
}